-- GENERATED SPELL FOR [Shadowmoon Technician] --


function spell0_17414(pUnit, Event) --@Silence,n/a--
pUnit:FullCastSpellOnTarget(6726,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17414', 5306, 1)
end

function spell1_17414(pUnit, Event) --@Throw Dynamite,n/a--
pUnit:FullCastSpellOnTarget(40062,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17414', 1000, 1)
end

function spell2_17414(pUnit, Event) --@Throw Dynamite,n/a--
pUnit:FullCastSpellOnTarget(40064,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17414', 1000, 1)
end

function spell3_17414(pUnit, Event) --@Throw Proximity Bomb,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(30846,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_17414', 1, 1)
end

function spell4_17414(pUnit, Event) --@Throw Proximity Bomb,n/a--
pUnit:FullCastSpellOnTarget(32784,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17414', 0, 1)
end

function Sorts_17414(pUnit, Event)
local choix_sorts_17414 = math.random(0, 4)
if choix_sorts_17414 == 0 then
pUnit:RegisterEvent('spell0_17414', 1, 1)
end
if choix_sorts_17414 == 1 then
pUnit:RegisterEvent('spell1_17414', 1, 1)
end
if choix_sorts_17414 == 2 then
pUnit:RegisterEvent('spell2_17414', 1, 1)
end
if choix_sorts_17414 == 3 then
pUnit:RegisterEvent('spell3_17414', 1, 1)
end
if choix_sorts_17414 == 4 then
pUnit:RegisterEvent('spell4_17414', 1, 1)
end
end

function mob17414_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17414', math.random(1500, 3000), 1)
end

function mob17414_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17414_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17414_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17414, 1, 'mob17414_Action')
RegisterUnitEvent(17414, 2, 'mob17414_Leave')
RegisterUnitEvent(17414, 3, 'mob17414_Kill')
RegisterUnitEvent(17414, 4, 'mob17414_Die')
